package com.smedi.ismedi.authority.starter.feign;

import com.smedi.ismedi.authority.starter.common.ResponseData;
import com.smedi.ismedi.authority.starter.response.AuthorityAccessResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "ismedi-authority-management", path = "/api/v1/authority/access")
public interface AuthorityAccessFeignClient {
    @GetMapping(value = "/validateTokenAndGetAuthorityAccessAndRefreshExpress")
    ResponseData<Object> getValidateTokenAndGetAuthorityAccessAndRefreshExpress(@RequestParam("token") String token);

    /**
     * 根据token获取用户信息
     *
     * @return ResponseData<AuthorityAccessResponse>
     */
    @GetMapping(value = "/current-user/info")
    ResponseData<AuthorityAccessResponse> getCurrentUserInfo();
}
